package de.recipeminer.models.generic;

/**
 * Represents the occurrence of an ingredient as part of a the recipe, specifing the used amount.
 *
 * @author Markus Ackeramnn
 */
public abstract class AbstractIngredientLineItem extends AnnotatableObject{
    AbstractRecipe recipe;
    AbstractIngredient ingredient;
    float amount;
    AbstractUnit unit;

    protected AbstractIngredientLineItem(AbstractRecipe recipe, AbstractIngredient ingredient,
                                         float amount, AbstractUnit unit) {
        this.recipe = recipe;
        this.ingredient = ingredient;
        this.amount = amount;
        this.unit = unit;
    }

    public AbstractRecipe getRecipe() {
        return recipe;
    }

    public AbstractIngredient getIngredient() {
        return ingredient;
    }

    public double getAmount() {
        return amount;
    }

    public AbstractUnit getUnit() {
        return unit;
    }
}
